/**
 * 
 */
package com.tomato.joke;

import android.os.Bundle;
import android.widget.TextView;

import com.tomato.joke.persistence.model.JokeTopic;
import com.tomato.joke.service.JokeTopicService;

/**
 * 主题详细信息
 * @author defier
 *
 */
public class TopicDetailActivity extends BaseActivity {
	
	private int topicId;
	private TextView contentView;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.topic_detail);
		
		initFooterEvent();
		
		initialData();
	}
	
	/**
	 * 初始化数据
	 */
	private void initialData() {
		topicId = getIntent().getIntExtra("id", 0);
//		String content = getIntent().getStringExtra("content");
		contentView = (TextView)findViewById(R.id.topic_content);
		JokeTopicService jokeTopicService = new JokeTopicService(this);
		JokeTopic topic = jokeTopicService.findById(topicId);
		contentView.setText(topic.getContent());
		
	 }
	

}
